feat: Add Zarr v2 metadata access and basic auth support for OIDC-protected assets#2112
feat: Add Zarr v2 metadata access and basic auth support for OIDC-protected assets#2112cauriol wants to merge 16 commits into
Conversation
Test Results 1 files - 3 1 suites - 3 33s ⏱️ - 3m 14s For more details on these failures, see this check. Results for commit d4f4729. ± Comparison against base commit 8c36c36. ♻️ This comment has been updated with latest results. |
Code Coverage (Ubuntu)DetailsDiff against developResults for commit: 9faf04a Minimum allowed coverage is ♻️ This comment has been updated with latest results |
Code Coverage (Windows)DetailsDiff against developResults for commit: 9faf04a Minimum allowed coverage is ♻️ This comment has been updated with latest results |
|
@cauriol, instead of introducing a new method @sbrunato can we get your opinion here ? |
@alambare I agree. |
141c247 to
ca62273
Compare
| def request_asset( | ||
| self, | ||
| url: str, | ||
| ) -> requests.Response: | ||
| """Perform a GET request to the given URL using product's authentication headers.""" | ||
| headers = self.get_storage_options().get("headers", {}) | ||
| return requests.get(url, headers=headers, stream=True) |
There was a problem hiding this comment.
we should use the stream download method from EODAG download plugins instead of creating a new method.
There was a problem hiding this comment.
get_storage_options implementation should be done in a separate PR
| def request_asset( | ||
| self, | ||
| url: str, | ||
| ) -> requests.Response: | ||
| """Perform a GET request to the given URL using product's authentication headers.""" | ||
| headers = self.get_storage_options().get("headers", {}) | ||
| return requests.get(url, headers=headers, stream=True) |
| authentication_uri_source: login-form | ||
| --- | ||
| !provider # MARK: desp_cache | ||
| name: desp_cache |
There was a problem hiding this comment.
Provider name and description need to be updated. "Cache" does not seem appropriate in name and description.
There was a problem hiding this comment.
After further consideration I think we cannot add this provider in EODAG because it the data is in internal FDP which is not publicly exposed. But we can add the collections to the dedl provider and we should keep the changes for the auth plugin.
There was a problem hiding this comment.
Provider and its registration are not documented
Code Coverage (Ubuntu)DetailsDiff against developResults for commit: d4f4729 Minimum allowed coverage is ♻️ This comment has been updated with latest results |
Benchmark comparisonCompared baseline: |
This PR adds support for accessing Zarr v2 assets from EOProduct and extends OIDC authentication handling to support Basic authorization for protected asset access.
Changes:
-add helper methods in EOProduct to:
- extract auth headers from auth objects
- request protected assets with forwarded authentication headers
- list files from Zarr v2 metadata using .zmetadata
Notes
this PR currently targets Zarr v2 only through .zmetadata
Zarr v3 support can be added later if needed